<div class="task-info-box">

  <div class="row">
    <div class="col-sm-1">
      <a class="btn btn-default"
         ui-sref={{mainStateName+"({projectId:currentProjectId})"}}>
        <span class="fa fa-mail-reply"></span> 返回
      </a>
    </div>

    <div class="col-sm-offset-1 col-sm-10" style="margin-top: 0" >
      <h2 class="text-center">{{currentSpecificTask.baseInfo.name}}</h2>
    </div>
  </div>

  <!-- 主要任务信息 -->
  <div id="task-info-content">

    <div class="task-info-item">
      <h2><span class="glyphicon glyphicon-star-empty"></span> 任务负责人</h2>
      <div class="task-info-item-content">
        <img ng-src="img/userHeadImage/{{handler.head_image}}" class="head-image" alt="{{handler.username}}" />
        <span style="padding-left: .45em;">{{handler.username}}</span>
      </div>
    </div>

    <div class="task-info-item" id="task-description">
      <h2><span class="fa fa-pencil"></span> 任务描述</h2>
        <div class="task-info-item-content" ng-class="{'task-description': editable}">

          <markdown-previewer
              style="font-size: .75em"
              ng-click="enterEditingDescription()"
              ng-hide="editing && editable && editingDescriptin"
              bind-content="currentSpecificTask.baseInfo.description">
          </markdown-previewer>

          <div ng-show="editing && editable && editingDescriptin" >
            <textarea
                rows="10"
                markdown-editor
                focus="editing && editable"
                hidden-callback="saveDescription()"
                full-screen="disable"
                ng-model="newTaskDescription">
            </textarea>
          </div>

        </div>
      <hr/>
    </div>

    <div class="task-info-item" ng-show="appointed_member.length || editable">
      <h2><span class="glyphicon glyphicon-user"></span> 参与者</h2>
      <div id="task-member" class="task-info-item-content">
        <member-selection
            addable-members="projectMembers"
            selected-members="appointed_member"
            editable="editable && !changingMember">
        </member-selection>
      </div>

      <hr/>
    </div>

    <div class="task-info-item" id="task-children" ng-show="currentSpecificTask.sub_task.length">
      <h2><span class="fa fa-tasks"></span> 子任务</h2>
      <ul class="task-info-item-content">
        <li ng-repeat="currentSubTask in currentSpecificTask.sub_task" class="childtask-list">
          <a ui-sref={{curStateName+"({projectId:currentProjectId,taskId:currentSubTask.id})"}}>
            {{ currentSubTask.name }}
          </a>
        </li>
      </ul>

    </div>

    <div class="task-info-item">
      <div ng-show="currentSpecificTask.parentTask">
        <h2><span class="fa fa-toggle-up"></span> 父任务</h2>
        <a class="task-info-item-content"
            ui-sref={{curStateName+"({projectId:currentProjectId,taskId:currentSpecificTask.parentTask.id})"}}
            style="color: #000000">
          {{currentSpecificTask.parentTask.name}}
        </a>
      </div>
    </div>

    <div class="task-info-item" id="task-deadline">
      <h2><span class="fa fa-calendar"></span> 任务截止时间</h2>
      <p class="task-info-item-content">{{ currentSpecificTask.baseInfo.expected_at }}</p>
      <hr/>
    </div>

    <div class="task-info-item">
      <h2><span class="glyphicon glyphicon-info-sign"></span> 任务优先级</h2>
      <!--<p class="task-info-item-content">{{ currentSpecificTask.taskPriority.label }}</p>-->
      <select class="form-control task-info-item-content"
              ng-model="currentSpecificTask.taskPriority.id"
              ng-options="priority.id as priority.label for priority in taskPriorityList"
              ng-disabled="editing || !editable"
              ng-change="changePriority(currentSpecificTask.taskPriority.id)">
      </select>
      <hr/>
    </div>

    <div class="task-info-item" id="task-status">
      <h2><span class="fa fa-flag"></span> 任务状态 </h2>
      <select class="form-control task-info-item-content"
              ng-model="currentSpecificTask.taskStatus.id"
              ng-options="status.id as status.label for status in taskStatusList"
              ng-disabled="!editable || editing" ng-change="changeTaskStatus(currentSpecificTask.taskStatus.id)">

      </select>
    </div>


  </div> <!-- End of 主要任务信息 -->

  <hr/>

</div>